package com.app.designpatternslearn.structured.filterpattern.code

class NumberFilterBook : FilterBook {

    override fun filter(books: MutableList<Book>): MutableList<Book> {

        val newBooks = mutableListOf<Book>()

        for (item in books) {
            if (item.number > 5) {
                newBooks.add(item)
            }
        }

        return newBooks
    }

}